﻿@model WD.Db.Contract.Base_CodeData
@{
    ViewBag.Title = "WD.Db.Contract.Model.Base_CodeData_Create";
    Layout = "~/Views/Shared/_LayoutEdit.cshtml";
}
<form id = "Base_CodeData_mainForm" action="@Url.Action("Edit", "CodeData")" method="POST">

    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.CodeName, "字典名称", new { @class = "" })

        @Html.TextBoxFor(model => model.CodeName, new { @class = "form-control" })
    </div>


    <div class="form-group col-xs-6 form-group-select2">
        @Html.LabelFor(model => model.CodeType, "父级类型", new { @class = "" })

        @Html.DropDownListFor(model => model.CodeType, ViewBag.list as IEnumerable<SelectListItem>, "请选择父级字典", new { style = "width:100%" })
    </div>
    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Data, "自定义数据1", new { @class = "" })

        @Html.TextBoxFor(model => model.Data, new { @class = "form-control" })
    </div>

    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Data2, "自定义数据2", new { @class = "" })

        @Html.TextBoxFor(model => model.Data2, new { @class = "form-control" })
    </div>
    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Data3, "自定义数据3", new { @class = "" })

        @Html.TextBoxFor(model => model.Data3, new { @class = "form-control" })
    </div>
    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Sort, "Sort", new { @class = "" })

        @Html.TextBoxFor(model => model.Sort, new { @class = "form-control" })
    </div>
</form>

<div class="clearfix"></div>

<script>

    $('#CodeType').select2();

    function Base_CodeDataCheckField() {
        //TODO 检查字段必填项 必须有返回值（成功TRUE,失败FALSE）

        return true;
    }

</script>

